package lee;

public class StringPath {
    public static void main(String[] args) {
        String path =  "http://localhost:8088/myweb/reg?name=zhangsan&pwd=123456&nick=san&age=16";
        String[] str = path.split("\\?");
        System.out.println("请求:"+str[0]);
        System.out.println("参数:"+str[1]);
        str = str[1].split("&");
        for (String s : str) {
            String[] data = s.split("=");
            System.out.println("参数名:"+data[0]+",参数值:"+data[1]);
        }
    }
}
